home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10441 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: News.CP.Duluth.MN.US!news
  2. From: Yan Saillard <kannun@cp.duluth.mn.us>
  3. Newsgroups: comp.lang.c++
  4. Subject: Need help making C program, C++
  5. Date: Wed, 06 Mar 1996 23:57:55 -0600
  6. Organization: ComputerPro Internet, Duluth, MN  (218)722-4245
  7. Message-ID: <313E7AE3.6F9C@cp.duluth.mn.us>
  8. NNTP-Posting-Host: pm29.cp.duluth.mn.us
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0 (Win95; I)
  13.  
  14. I'm writing a calculator program for a class assignment and its already 
  15. done in C and I wanted to "convert it" to C++. Any help would be 
  16. appreciated!
  17.  
  18. Here's the messages I got after compiling it (turbo c++ 3.1) with the 
  19. lines below.
  20.  
  21. *Warning CALK.CPP 19: Style of function definition is now obsolete
  22. int doOp(o,r) char o; int r;
  23.  
  24. *Warning CALK.CPP 30: Style of function definition is now obsolete:
  25. void showResult(r) int r;
  26.  
  27. What would be the way C++ defines functions?
  28.  
  29. *Error CALK.CPP 39: Function 'getchar' should have a prototype
  30. while((op = getchar()) != 'q')
  31.  
  32. this program ran fine in C.
  33.  
  34. Thanks!
  35. -- 
  36. ___________________________________________________________________
  37.   ____  __.   _____    _______    _______    ____ ___  _______   
  38.  |   |/   |  /  _  \   \      \   \      \  |    |   \ \      \  
  39.  |      <   /  /_\  \  /   |   \  /   |   \ |    |   / /   |   \ 
  40.  |    |  \ /    |    \/    |    \/    |    \|    |  / /    |    \
  41.  |____|__ \\____|__  /\____|__  /\____|__  /|______/  \____|__  /
  42.          \/        \/         \/         \/@cp.duluth.mn.us   \/ 
  43. ___________________________________________________________________
  44.